/**
 * 获取酒店
 * @param { object } search
*/
// eslint-disable-next-line no-shadow
export function search({ search }) {
  return RSocket.rs({
    route: 'biz.merchants.search',
    args: {
      search,
    },
  });
}

/**
 * 获取酒店数量
 * @param { object }  search pg
 */
// eslint-disable-next-line no-shadow
export function count({ search, pg }) {
  return RSocket.rr({
    route: 'biz.merchants.search.count',
    args: {
      search, pg,
    },
  });
}

/**
 * 获取酒店数量
 * @param { object }  data
 */
// eslint-disable-next-line no-shadow
export function update(data) {
  return RSocket.rr({
    route: 'biz.merchants.update',
    data: {
      ...data,
    },
  });
}

/**
 * 获取商户价格方案
 * @param { object }  args
 */
export function getChannelPrice() {
  return RSocket.rr({
    route: 'dmn.rules.channel-price.docs-by-type.TPricePlan',
  });
}
